package org.sdfc.model

import com.documentum.fc.common.IDfId
import com.documentum.fc.common.IDfTime

import org.sdfc.model.attr._

trait MutableTypedObject extends TypedObject {
  
  //attributes writing methods mimicking IDfTypedObject
  
  /** Sets the value of a SingleBooleanAttribute. */
  def setBoolean(attr : SingleBooleanAttribute, value : Boolean) : Unit
  
  /** Sets the value of a SingleIntAttribute. */
  def setInt(attr : SingleIntAttribute, value : Int) : Unit
  
  /** Sets the value of a SingleStringAttribute. */
  def setString(attr : SingleStringAttribute, value : String) : Unit
  
  /** Sets the value of a SingleIdAttribute. */
  def setId(attr : SingleIdAttribute, value : IDfId) : Unit
  
  /** Sets the value of a SingleTimeAttribute. */
  def setTime(attr : SingleTimeAttribute, value : IDfTime) : Unit
  
  /** Sets the value of a SingleDoubleAttribute. */
  def setDouble(attr : SingleDoubleAttribute, value : Double) : Unit
  
  
  /** Sets the value of a RepeatingBooleanAttribute at a given index. */
  def setRepeatingBoolean(attr : RepeatingBooleanAttribute, index : Int, value : Boolean) : Unit
  
  /** Sets the value of a RepeatingIntAttribute at a given index. */
  def setRepeatingInt(attr : RepeatingIntAttribute, index : Int, value : Int) : Unit
  
  /** Sets the value of a RepeatingStringAttribute at a given index. */
  def setRepeatingString(attr : RepeatingStringAttribute, index : Int, value : String) : Unit
  
  /** Sets the value of a RepeatingIdAttribute at a given index. */
  def setRepeatingId(attr : RepeatingIdAttribute, index : Int, value : IDfId) : Unit
  
  /** Sets the value of a RepeatingTimeAttribute at a given index. */
  def setRepeatingTime(attr : RepeatingTimeAttribute, index : Int, value : IDfTime) : Unit
  
  /** Sets the value of a RepeatingDoubleAttribute at a given index. */
  def setRepeatingDouble(attr : RepeatingDoubleAttribute, index : Int, value : Double) : Unit
  
  
  /** Inserts a value for a RepeatingBooleanAttribute at a given index. */
  def insertBoolean(attr : RepeatingBooleanAttribute, index : Int, value : Boolean) : Unit
  
  /** Inserts a value for a RepeatingIntAttribute at a given index. */
  def insertInt(attr : RepeatingIntAttribute, index : Int, value : Int) : Unit
  
  /** Inserts a value for a RepeatingStringAttribute at a given index. */
  def insertString(attr : RepeatingStringAttribute, index : Int, value : String) : Unit
  
  /** Inserts a value for a RepeatingIdAttribute at a given index. */
  def insertId(attr : RepeatingIdAttribute, index : Int, value : IDfId) : Unit
  
  /** Inserts a value for a RepeatingTimeAttribute at a given index. */
  def insertTime(attr : RepeatingTimeAttribute, index : Int, value : IDfTime) : Unit
  
  /** Inserts a value for a RepeatingDoubleAttribute at a given index. */
  def insertDouble(attr : RepeatingDoubleAttribute, index : Int, value : Double) : Unit
  
  
  /** Appends a value for a RepeatingBooleanAttribute at end of list. */
  def appendBoolean(attr : RepeatingBooleanAttribute, value : Boolean) : Unit
  
  /** Appends a value for a RepeatingIntAttribute at end of list. */
  def appendInt(attr : RepeatingIntAttribute, value : Int) : Unit
  
  /** Appends a value for a RepeatingStringAttribute at end of list. */
  def appendString(attr : RepeatingStringAttribute, value : String) : Unit
  
  /** Appends a value for a RepeatingIdAttribute at end of list. */
  def appendId(attr : RepeatingIdAttribute, value : IDfId) : Unit
  
  /** Appends a value for a RepeatingTimeAttribute at end of list. */
  def appendTime(attr : RepeatingTimeAttribute, value : IDfTime) : Unit
  
  /** Appends a value for a RepeatingDoubleAttribute at end of list. */
  def appendDouble(attr : RepeatingDoubleAttribute, value : Double) : Unit
  
  
  /** Removes value of a RepeatingAttribute at a given index. */
  def remove(attr : RepeatingAttribute[Any], index : Int) : Unit
  
  /** Removes all values of a RepeatingAttribute. */
  def removeAll(attr : RepeatingAttribute[Any]) : Unit
  
  /** Truncates the values of a RepeatingAttribute at a given index. */
  def truncate(attr : RepeatingAttribute[Any], index : Int) : Unit
  
  
  //convenient additional attributes reading methods
  
  /** Sets all values for a RepeatingBooleanAttribute. */
  def setBooleanValues(attr : RepeatingBooleanAttribute, values : TraversableOnce[Boolean]) : Unit
  
  /** Sets all values for a RepeatingIntAttribute. */
  def setIntValues(attr : RepeatingIntAttribute, values : TraversableOnce[Int]) : Unit
  
  /** Sets all values for a RepeatingStringAttribute. */
  def setStringValues(attr : RepeatingStringAttribute, values : TraversableOnce[String]) : Unit
  
  /** Sets all values for a RepeatingIdAttribute. */
  def setIdValues(attr : RepeatingIdAttribute, values : TraversableOnce[IDfId]) : Unit
  
  /** Sets all values for a RepeatingTimeAttribute. */
  def setTimeValues(attr : RepeatingTimeAttribute, values : TraversableOnce[IDfTime]) : Unit
  
  /** Sets all values for a RepeatingDoubleAttribute. */
  def setDoubleValues(attr : RepeatingDoubleAttribute, values : TraversableOnce[Double]) : Unit
  
  
  /** Appends some values to existing ones of a RepeatingBooleanAttribute. */
  def appendBooleanValues(attr : RepeatingBooleanAttribute, values : TraversableOnce[Boolean]) : Unit
  
  /** Appends some values to existing ones of a RepeatingIntAttribute. */
  def appendIntValues(attr : RepeatingIntAttribute, values : TraversableOnce[Int]) : Unit
  
  /** Appends some values to existing ones of a RepeatingStringAttribute. */
  def appendStringValues(attr : RepeatingStringAttribute, values : TraversableOnce[String]) : Unit
  
  /** Appends some values to existing ones of a RepeatingIdAttribute. */
  def appendIdValues(attr : RepeatingIdAttribute, values : TraversableOnce[IDfId]) : Unit
  
  /** Appends some values to existing ones of a RepeatingTimeAttribute. */
  def appendTimeValues(attr : RepeatingTimeAttribute, values : TraversableOnce[IDfTime]) : Unit
  
  /** Appends some values to existing ones of a RepeatingDoubleAttribute. */
  def appendDoubleValues(attr : RepeatingDoubleAttribute, values : TraversableOnce[Double]) : Unit
  
}